package com.xiaochong.tir.manager.service;

import java.util.List;

import com.xiaochong.tir.manager.config.druid.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xiaochong.tir.common.data.mapper.RoleNavigationMapper;
import com.xiaochong.tir.common.data.po.Navigation;
import com.xiaochong.tir.common.data.po.RoleNavigation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class RoleNavigationService {
    @Autowired
	private RoleNavigationMapper roleNavigationMapper;

	public int deleteByRoleId(Integer roleId) {
		return roleNavigationMapper.deleteByRoleId(roleId);
	}
	@Operation
	@Transactional
	public int insertBatch(List<RoleNavigation> list) {
		return roleNavigationMapper.insertBatch(list);
	}

	public List<Navigation> getNavigationByRoleId(RoleNavigation record) {
		return roleNavigationMapper.getNavigationByRoleId(record);
	}

}
